package com.aiwei.tdjk.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
/**
 * Created by yanfeng on 2016/12/19.
 */
@NoArgsConstructor
@AllArgsConstructor
public enum UserStatusEnum {

    normal(0,"正常状态"), blocked(1,"封禁状态");

    @Getter
    private Integer code;
    @Getter
    private String info;


    public static UserStatusEnum getValue(int code) {
        final UserStatusEnum[] values = UserStatusEnum.values();
        for (UserStatusEnum value : values) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }


}
